/*
 * @Author: zhengzhuang
 * @Date: 2020-08-21 11:15:58
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-01-25 16:45:13
 * @Description: Mqtt接受消息model类比
 * @FilePath: /maitianshanglv_passenger_1.0.0/lib/model/mqtt_msg_model.dart
 */
class MqttMsgModel {
  String messageType;
  String sendId;
  String targetId;
  String sendTimeStamp;
  Map<String, dynamic> content;

  MqttMsgModel(
      {this.content,
      this.sendId,
      this.targetId,
      this.messageType,
      this.sendTimeStamp});

  MqttMsgModel.fromJson(Map<String, dynamic> json) {
    content = json['content'];
    messageType = json['messageType'];
    sendId = json['sendId'];
    targetId = json['targetId'];
    sendTimeStamp = json['sendTimeStamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['content'] = this.content;
    data['messageType'] = this.messageType;
    data['sendId'] = this.sendId;
    data['targetId'] = this.targetId;
    data['sendTimeStamp'] = this.sendTimeStamp;
    return data;
  }
}
